package com.restaurant.application.util;

import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;

public class ImageData implements PickableBean {

    String systemName;
    String externalName;
    String type;
    String status;
    Integer width;
    Integer height;
    Integer fileSize;
    Integer length;
    String userMessage;
    Boolean important;
    Long time;

    public ImageData(String systemName, String externalName, String type, String status, Integer width, Integer height, Integer fileSize, Integer length, String userMessage, Boolean important, Long time) {
        setSystemName(systemName);
        setExternalName(externalName);
        setType(type);
        setStatus(status);
        setWidth(width);
        setHeight(height);
        setFileSize(fileSize);
        setLength(length);
        setUserMessage(userMessage);
        setImportant(important);
        setTime(time);
    }

    public ImageData() {
    }

    public ImageData duplicate() {
        ImageData result = new ImageData();
        result.systemName = this.systemName;
        result.externalName = this.externalName;
        result.type = this.type;
        result.status = this.status;
        result.width = this.width;
        result.height = this.height;
        result.fileSize = this.fileSize;
        result.length = this.length;
        result.userMessage = this.userMessage;
        result.important = this.important;
        result.time = this.time;
        return result;
    }

    @Override
    public String toString() {
        return Convert.toJson(this);
    }

    public String getSystemName() {
        return systemName;
    }

    public void setSystemName(String value) {
        this.systemName = value;
    }

    public ImageData withSystemName(String value) {
        setSystemName(value);
        return this;
    }

    public String getExternalName() {
        return externalName;
    }

    public void setExternalName(String value) {
        this.externalName = value;
    }

    public ImageData withExternalName(String value) {
        setExternalName(value);
        return this;
    }

    public String getType() {
        return type;
    }

    public void setType(String value) {
        this.type = value;
    }

    public ImageData withType(String value) {
        setType(value);
        return this;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String value) {
        this.status = value;
    }

    public ImageData withStatus(String value) {
        setStatus(value);
        return this;
    }

    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer value) {
        this.width = value;
    }

    public ImageData withWidth(Integer value) {
        setWidth(value);
        return this;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer value) {
        this.height = value;
    }

    public ImageData withHeight(Integer value) {
        setHeight(value);
        return this;
    }

    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer value) {
        this.fileSize = value;
    }

    public ImageData withFileSize(Integer value) {
        setFileSize(value);
        return this;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer value) {
        this.length = value;
    }

    public ImageData withLength(Integer value) {
        setLength(value);
        return this;
    }

    public String getUserMessage() {
        return userMessage;
    }

    public void setUserMessage(String value) {
        this.userMessage = value;
    }

    public ImageData withUserMessage(String value) {
        setUserMessage(value);
        return this;
    }

    public Boolean getImportant() {
        return important;
    }

    public void setImportant(Boolean value) {
        this.important = value;
    }

    public ImageData withImportant(Boolean value) {
        setImportant(value);
        return this;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long value) {
        this.time = value;
    }

    public ImageData withTime(Long value) {
        setTime(value);
        return this;
    }

    public Object getValueOf(String name) {
        switch (name) {
            case "systemName":
                return getSystemName();
            case "externalName":
                return getExternalName();
            case "type":
                return getType();
            case "status":
                return getStatus();
            case "width":
                return getWidth();
            case "height":
                return getHeight();
            case "fileSize":
                return getFileSize();
            case "length":
                return getLength();
            case "userMessage":
                return getUserMessage();
            case "important":
                return getImportant();
            case "time":
                return getTime();
        }
        return null;
    }

    @Override
    public int hashCode() {
        return signature().hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof ImageData)) return false;
        return signature().equals(((ImageData) o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean ImageData has no signature defined, no hash code or equals possible.");
    }
}
